import request from '@/utils/request'
import define from '@/utils/define'

const host = define.ossURL
export function getPath(data) {
	return host
}

export function logOut(data) {
	uni.setStorageSync('expireTime', null);
	uni.setStorageSync('token', null);
	uni.setStorageSync('userinfo',null);
}

// 登录
export function login(data) {
	return request({
		url: '/wx/phone/getPhoneNumber',
		method: 'post',
		data,
		options: {
			load: false
		}
	})
}

//获取会议室列表
export async function getList(data) {
	return request({
		url: '/wx/meeting/list',
		method: 'post',
		data,
		options: {
			load: false
		}
	})
}

//获取会议室列表预约时段
export function getTimeFrameByList(data) {
	return request({
		url: '/wx/meeting/selectMeetingTimeFrame',
		method: 'post',
		data,
		options: {
			load: false
		}
	})
}

//会议室预约
export function addReserve(data) {
	return request({
		url: '/wx/meeting/meetingReserve',
		method: 'post',
		data,
		options: {
			load: false
		}
	})
}

//会议室预定操作 1确认到店  4取消
export async function expOperation(data) {
	return request({
		url: '/wx/meeting/meetingOperation',
		method: 'post',
		data,
		options: {
			load: false
		}
	})
}

//获取楼宇列表
export async function getBuildingByList(data) {
	return request({
		url: '/wx/meeting/buildingList',
		method: 'post',
		data,
		options: {
			load: false
		}
	})
}